# 添加测试可执行文件
add_executable(test_logger
    test_logger.cc
)

# 设置测试可执行文件输出目录
set_target_properties(test_logger PROPERTIES
    RUNTIME_OUTPUT_DIRECTORY ../bin
)

# 链接主项目的Logger库
target_link_libraries(test_logger PRIVATE
    net_logger_lib
    spdlog
)

# 包含目录
target_include_directories(test_logger PRIVATE
    ${CMAKE_CURRENT_SOURCE_DIR}/..
)

# 添加测试
add_test(NAME logger_test COMMAND ${CMAKE_BINARY_DIR}/bin/test_logger)